import request from '@/utils/request'

export const getDeptmentsAPI = () => {
  return request('/company/department')
}

export const getManagersAPI = () => {
  return request('/sys/user/simple')
}

export const addDepartmentAPI = (data) => {
  return request.post('/company/department', data)
}

export const getDeptmentdetailAPI = (id) => {
  return request.get(`/company/department/${id}`)
}

export const updateDepartmentAPI = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

export const deleteDepartmentAPI = (id) => {
  return request.delete(`/company/department/${id}`)
}
